package com.water.camera.kt

import android.widget.FrameLayout
import androidx.fragment.app.FragmentActivity
import com.snap.base.ktx.adBanner
import com.snap.base.ktx.adInterstitial
import com.snap.base.ktx.isEnableConfigWithKey
import com.snap.base.util.BaseUtil
import com.water.camera.kt.AdConfig

open class AdUtil {

    companion object {

        fun showMainInsert(context: FragmentActivity) {
            if (!BaseUtil.isEnableConfigWithKey(AdConfig.AD_INSERT_IN_MAIN)) return
            BaseUtil.adInterstitial(context)
        }

        fun showBanner(context: FragmentActivity, frameLayout: FrameLayout) {
            if (!BaseUtil.isEnableConfigWithKey(AdConfig.AD_BANNER)) return
            BaseUtil.adBanner(context, frameLayout)
        }
    }
}